﻿using System;

namespace CShape_3_1
{
    class Rectangle
    {
        private double length;
        private double width;

        public Rectangle(double length, double width)
        {
            this.length = length;
            this.width = width;
        }

        public double getlength()
        {
            return length;
        }
        public double getWidth()
        {
            return width;
        }
        private void setlength(double length)
        {
            this.length = length;
        }
        private void setwidth(double width)
        {
            this.width = width;
        }

        public double RectanglePerimeter()
        {
            return (length + width) * 2;
        }
        public double RectangleArea()
        {
            return length * width;
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            Rectangle rect = new Rectangle(6.5, 5.2);

            Console.WriteLine($"长方形的周长：{rect.RectanglePerimeter():F2}");
            Console.WriteLine($"长方形的面积：{rect.RectangleArea():F2}");
        }
    }
}